package com.ly.base.annotation.repeat;

import java.lang.reflect.Method;

/**
 * @Classname Test
 * @Description TODO
 * @Date 2020/9/30 11:43
 * @Author 冷心影翼
 */
public class Test {

	@RepeatAnnotation("hello")
	@RepeatAnnotation("world")
	public void f() {

	}

	public static void main(String[] args) throws NoSuchMethodException {

		Class<Test> testClass = Test.class;
		Method f = testClass.getMethod("f");
		RepeatAnnotation[] annotationsByType = f.getAnnotationsByType(RepeatAnnotation.class);

		for (RepeatAnnotation a : annotationsByType ) {
		    System.out.println(a.value());
		}
	}
}
